@@ -41,5 +41,5 @@ window.map_marker = (map, options = {}) -> |
||
41 | 41 |
offset: '100%' |
42 | 42 |
} |
43 | 43 |
] |
44 |
- |
|
44 |
+ |
|
45 | 45 |
return arrow |
@@ -28,27 +28,27 @@ |
||
28 | 28 |
points.push(map_marker(map, loc)); |
29 | 29 |
<% end %> |
30 | 30 |
|
31 |
- function Visibility(group, map) { |
|
31 |
+ function toggleAccuracy(group, map) { |
|
32 | 32 |
for (var i = 0; i < group.length; i++) { |
33 | 33 |
group[i].setMap(map); |
34 | 34 |
} |
35 | 35 |
} |
36 | 36 |
|
37 |
- Visibility(circles, null); |
|
37 |
+ toggleAccuracy(circles, null); |
|
38 | 38 |
|
39 | 39 |
$(document).ready(function() { |
40 | 40 |
$("input#toggle").on("click", function() { |
41 | 41 |
if($(this).is(":checked")){ |
42 |
- Visibility(circles, map); |
|
43 |
- Visibility(points, null); |
|
42 |
+ toggleAccuracy(circles, map); |
|
43 |
+ toggleAccuracy(points, null); |
|
44 | 44 |
} |
45 |
- else if($(this).is(":not(:checked)")){ |
|
46 |
- Visibility(circles, null); |
|
47 |
- Visibility(points, map); |
|
45 |
+ else { |
|
46 |
+ toggleAccuracy(circles, null); |
|
47 |
+ toggleAccuracy(points, map); |
|
48 | 48 |
} |
49 | 49 |
}); |
50 | 50 |
if(circles.length > 0){ |
51 |
- $(".checkbox").removeClass("hidden"); |
|
51 |
+ $(".toggle-accuracy").removeClass("hidden"); |
|
52 | 52 |
} |
53 | 53 |
}); |
54 | 54 |
|
@@ -59,7 +59,7 @@ |
||
59 | 59 |
</p> |
60 | 60 |
<% end %> |
61 | 61 |
|
62 |
-<div class="hidden checkbox"> |
|
62 |
+<div class="hidden toggle-accuracy checkbox"> |
|
63 | 63 |
<label> |
64 | 64 |
<input id="toggle" type="checkbox" value=""> |
65 | 65 |
Show accuracy of locations |